package com.store.utils;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class JsonResult implements Serializable {
    private Integer state;// 状态
    private String msg;// 封装信息
    private Object data;// 返回给客户端的数据

    public JsonResult(Integer state, String msg) {
        this.state = state;
        this.msg = msg;
    }

    public JsonResult(Integer state, Object data) {
        this.state = state;
        this.data = data;
    }

    public JsonResult(String msg, Object data) {
        this.msg = msg;
        this.data = data;
    }

}
